﻿﻿// Copyright (c) Microsoft Corporation. All rights reserved. See License.txt in the project root for license information.

using Microsoft.Practices.EnterpriseLibrary.TransientFaultHandling;
using Microsoft.ServiceBus.Messaging;
using System;

namespace Nardax.Azure.ServiceBus
{
    public class SubscriptionAdapterDescription : SubscriptionAdapterDescription<BrokeredMessage>
    {
        public SubscriptionAdapterDescription()
        {
            BrokeredMessageContainerFactory = new BrokeredMessageContainerFactory();
        }
    }

    public class SubscriptionAdapterDescription<T>
    {
        public string[] ConnectionStrings { get; set; }

        public TopicDescription TopicDescription { get; set; }

        public SubscriptionDescription SubscriptionDescription { get; set; }

        public RetryPolicy RetryPolicy { get; set; }

        public RuleDescription RuleDescription { get; set; }

        public IBrokeredMessageContainerFactory<T> BrokeredMessageContainerFactory { get; set; }

        public int PrefetchCount { get; set; }

        public int DeadLetterQueuePrefetchCount { get; set; }

        public TimeSpan ServerWaitTime { get; set; }

        public int MaxDeliveryCount { get; set; }
    }
}